package ru.hh.team02.chat.server.SendMessage;

import ru.hh.team02.chat.server.Client;



public class Message {
    private final String text;
    private final Client client;
    
    public Client getClient() {
		return client;
	}

	public String getText() {
		return text;
	}

	/**
     * Create a message.
     * @param text Message text
     * @param p Client this message is addressed to
     */
    public Message(String text, Client client) {
        this.text = text;
        this.client = client;
    }
    
    public void SendMessage() {
    	getClient().sendMessageToClientComputer(this);
    }
}
